package com.whj.apidriver.controller;

import com.whj.apidriver.service.PayService;
import com.whj.internalcommon.dto.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: wanghaijun
 * @Date: 2023/2/28 - 02 - 28 - 16:23 
 * @Description: com.whj.apidriver.controller
 */

@RestController
@RequestMapping("/pay")
public class PayController {

    @Autowired
    private PayService payService;

    /**
     * 司机发起收款
     *
     * @param orderId 订单id
     * @param price 订单价格
     * @return
     */
    @PostMapping("/push-pay-info")
    public ResponseResult pushPayInfo(@RequestParam Long orderId,@RequestParam String price,@RequestParam Long passengerId){
        return payService.pushPayInfo(orderId,price,passengerId);
    }
}
